package ru.spbau.bytecode;

import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;

import ru.spbau.bytecode.graph.CompositeVertexTest;
import ru.spbau.bytecode.graph.EdgeTest;
import ru.spbau.bytecode.graph.GraphTest;
import ru.spbau.bytecode.graph.VertexTest;
import ru.spbau.bytecode.projectobserver.ClassesObserverTest;
import ru.spbau.bytecode.projectobserver.PackagesObserverTest;
import ru.spbau.bytecode.reader.BytecodeReaderTest;

public class Tester {

	public static void main(String[] args) {
		Result res = JUnitCore.runClasses(
				BytecodeReaderTest.class,
				VertexTest.class, 
				EdgeTest.class, 
				GraphTest.class,
				CompositeVertexTest.class,
				PackagesObserverTest.class,
				ClassesObserverTest.class);
		
		System.err.println(res.getFailureCount() + " tests failed");
		for (Failure f: res.getFailures()) {
			System.err.println(f.toString());
		}
	}

}
